package com.buli.blmall.generator.metadata;

import com.buli.blmall.generator.enums.JdbcType;

import java.util.List;

/**
 * 表元数据
 * @author xiang.gao
 * @date 2024/12/9 15:51
 */
public class MetaTable {

    public static class Table {
        private String name;
        private String remarks;
        private String tableType;
        private List<Column> columnList;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getRemarks() {
            return remarks;
        }

        public void setRemarks(String remarks) {
            this.remarks = remarks;
        }

        public String getTableType() {
            return tableType;
        }

        public void setTableType(String tableType) {
            this.tableType = tableType;
        }

        public List<Column> getColumnList() {
            return columnList;
        }

        public void setColumnList(List<Column> columnList) {
            this.columnList = columnList;
        }
    }

    public static class Column {
        private boolean primaryKey;
        private boolean autoIncrement;
        private String name;
        private int length;
        private String remarks;
        private String defaultValue;
        private JdbcType jdbcType;
        private String typeName;
        private String javaType;
        private String javaField;
        private int scale;

        public Column() {
        }

        public boolean isPrimaryKey() {
            return primaryKey;
        }

        public void setPrimaryKey(boolean primaryKey) {
            this.primaryKey = primaryKey;
        }

        public boolean isAutoIncrement() {
            return autoIncrement;
        }

        public void setAutoIncrement(boolean autoIncrement) {
            this.autoIncrement = autoIncrement;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getLength() {
            return length;
        }

        public void setLength(int length) {
            this.length = length;
        }

        public String getRemarks() {
            return remarks;
        }

        public void setRemarks(String remarks) {
            this.remarks = remarks;
        }

        public String getDefaultValue() {
            return defaultValue;
        }

        public void setDefaultValue(String defaultValue) {
            this.defaultValue = defaultValue;
        }

        public JdbcType getJdbcType() {
            return jdbcType;
        }

        public void setJdbcType(JdbcType jdbcType) {
            this.jdbcType = jdbcType;
        }

        public String getTypeName() {
            return typeName;
        }

        public void setTypeName(String typeName) {
            this.typeName = typeName;
        }

        public String getJavaType() {
            return javaType;
        }

        public void setJavaType(String javaType) {
            this.javaType = javaType;
        }

        public String getJavaField() {
            return javaField;
        }

        public void setJavaField(String javaField) {
            this.javaField = javaField;
        }

        public int getScale() {
            return scale;
        }

        public void setScale(int scale) {
            this.scale = scale;
        }
    }



}
